package cn.donting.plugin.spring.boot.starter.dev;

import cn.donting.plugin.spring.boot.starter.Plugin;
import cn.donting.plugin.spring.boot.starter.PluginWrapper;
import cn.donting.plugin.spring.boot.starter.configuration.MainApplication;

import java.io.File;

/**
 * @author donting
 * 2020-06-30 15:25
 */
public class DevPluginWrapper  extends PluginWrapper {

    public DevPluginWrapper(String path, ClassLoader classLoader, Plugin plug, Class<?> plugClass) {
        super(path, classLoader, plug, plugClass);
        String path1 = MainApplication.getPluginProperties().getPath();
        setDataPath(path1+File.separator+"dev");
        File file = new File(getDataPath());
        if (!file.exists()) {
            file.mkdirs();
        }
    }
}
